import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/home/',
    name: 'Nome',
   
    component: () => import( '../views/home.vue')
  },
  {
    path: '/list',
    name: 'List',
   
    component: () => import( '../views/list.vue')
  },
  {
    path: '/shop',
    name: 'Shop',
   
    component: () => import( '../views/shop.vue')
  },
  {
    path: '/wode',
    name: 'Wode',
   
    component: () => import( '../views/wode.vue'),
  
  },
  {
    path: '/shopping',
    name: 'Shopping',
   
    component: () => import( '../views/shopping.vue')
  },
  {
    path: '/paiming',
    name: 'paiming',
   
    component: () => import( '../views/paiming.vue')
  },
  {
    path: '/coudan',
    name: 'coudan',
   
    component: () => import( '../views/coudan.vue')
  },
  {
    path: '/dizhi',
    name: 'dizhi',
   
    component: () => import( '../views/dizhi.vue')
  },
  {
    path: '/dizhi2',
    name: 'dizhi2',
   
    component: () => import( '../views/dizhi2.vue')
  },
  {
    path: '/denglu',
    name: 'denglu',
   
    component: () => import( '../views/denglu.vue')
  },
  {
    path: '/zhuce',
    name: 'zhuce',
   
    component: () => import( '../views/zhuce.vue')
  },
  {
    path: '/lianxi',
    name: 'lianxi',
   
    component: () => import( '../views/lianxi.vue')
  },
  {
    path: '/null',
    name: 'null',
   
    component: () => import( '../views/null.vue'),
    beforeEnter(to,from,next){
      console.log(to)
      console.log(from)
      // 进行一些是否登录的判断判断成功让她进入  不成功不能进
     confirm("当前页面是vip页面")
      next("/wode")//不让下一步
    }
  },
  {
    path: '/',
    redirect: '/home',
  },

  {
    path: '*',
    name: 'no',
   
    component: () => import( '../views/no.vue')
  },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
